﻿<UserControl x:Class="Tfl.Controls.WPF.LineStatusControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vm="clr-namespace:Tfl.Controls.WPF.ViewModel"
             mc:Ignorable="d" 
             Background="Transparent"
             d:DesignHeight="300" d:DesignWidth="300"
             FontFamily="London Tube"
             FontSize="15"
             d:DataContext="{d:DesignInstance vm:DesignTimeLineStatusViewModel, IsDesignTimeCreatable=True}">
    <Grid>
        <Border Background="AntiqueWhite" BorderBrush="Black" BorderThickness="2" CornerRadius="15">
            <Border.Effect>
            <DropShadowEffect ShadowDepth="6" Direction="320"></DropShadowEffect>
            </Border.Effect>
            <StackPanel Margin="10,10,10,10">
                <TextBlock Text="{Binding Path=Title}"></TextBlock>
                <ListBox HorizontalContentAlignment="Stretch" Background="AntiqueWhite" ItemsSource="{Binding Path=LineStatuses}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel  Background="{Binding Path=Color}">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Foreground="White" Text="{Binding Path=Line}" ></TextBlock>
                                    <TextBlock Foreground="White" Margin="10,0,10,0">:</TextBlock>
                                    <TextBlock Foreground="White" Text="{Binding Path=Status}"></TextBlock>
                                </StackPanel>
                                <TextBlock Foreground="White" Text="{Binding Path=Description}"></TextBlock>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </StackPanel>
        </Border>
    </Grid>
</UserControl>
